<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core" 
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"> 

<h:head>
	<title>Altera Dados Cardápio</title>
	<link rel="stylesheet" href="../../../../../resources/styles/layout.css" type="text/css"/>
</h:head>

<h:body>
	<h:form id="form1">
	<div class="wrapper row1">
	  <header id="header" class="clear">
	    <hgroup>
	      <h1><a href="index.html">Cardápio Mobile</a></h1>
	      <h2>Seu cardápio para o mundo todo </h2>
	    </hgroup>
			<fieldset class="fl_right">
		    	<p:panel style="width:300px;height:50px;right:200px;top:60px;background:#696969;border:1px solid black">  
			    	<h:outputLabel style="font-weight:bold;color:#FFFFE0;" value="Usuário:"/>
					<h:outputLabel style="font-weight:bold;color:#FFA500;" value="#{loginMB.getSessao('NomeUsuario')}"/>  
					<fieldset>		
						<h:outputLabel value="Restaurante:" style="font-weight:bold;color:#FFFFE0;"/>  
						<h:outputLabel style="font-weight:bold;color:#FFA500;" value="#{loginMB.getSessao('NomeFantasia')}"/>
					</fieldset>  
				</p:panel> 
			</fieldset>
			<fieldset>
			<p></p>
			</fieldset>
			
	    <nav class="clear">
	      <ul>
	        <li class="active"><a href="#">Minha Conta</a>
	          <ul>
	            <li><a href="../../user/portalCardapioMundo.jsf">Portal Home</a></li>
	            <li><a href="../../user/meusDados.jsf">Meus Dados</a></li>
	            <li><a href="../../user/portalCardapioMundo.jsf?changeAccess=EEN013550">Trocar Acesso</a></li>
	            <li onclick="PF('dlgSair').show()"><a href="#">Sair</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>
	        
	        <li><a href="#">Acesso</a>
	          <ul>
	            <li><a href="../admin/cadUsuario.jsf">Novo Usuário</a></li>
	            <li><a href="consUsuario.jsf">Consulta Usuários</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>
	        
	        <li><a href="#">Restaurante</a>
	          <ul>
	            <li><a href="../admin/cadRestauranteFilial.jsf">Novo Restaurante</a></li>
	            <li><a href="consRestaurante.jsf">Consulta Restaurante</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Cardápio</a>
	          <ul>
	            <li><a href="../../cardapio/opcaoCardapios.jsf">Novo Cardápio</a></li>
	            <li><a href="../../cardapio/consCardapios.jsf">Cardápios</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Business Intelligence</a>
	          <ul>
	            <li><a href="#">Avaliações Cardápio</a></li>
	            <li><a href="#">Avaliações Atendimento</a></li>
	            <li><a href="#">Avaliações Infraestrutura</a></li>
	            <li><a href="#">Avaliação Geral</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Pagamento</a>
	          <ul>
	            <li><a href="#">Meus Pagamentos</a></li>
	          </ul>
	        </li>
	        <li><a href="#">Plano</a>
	          <ul>
	            <li><a href="#">Meu Plano</a></li>
	            <li><a href="#">Renovação</a></li>
	            <li><a href="#">Novos Planos</a></li>
	          </ul>
	        </li>
	        
	      </ul>
	    </nav>
	  </header>
	</div>
	
	
	<p:dialog id="dialogSair" header="Opção Logout" modal="true" height="85" width="510" widgetVar="dlgSair" resizable="false" 
	showEffect="fade" hideEffect="fade">  
		<h:panelGrid columns="2" cellpadding="5">  
			<h:outputLabel for="username" value="Deseja desconectar do portal Cardápio Mobile ?" style="font-size:15px"/>
		</h:panelGrid>
				          
		<f:facet name="footer">  
			<p class="fl_left">
			<p:commandButton id="cancelarButton" value="Cancelar" height="50" width="50" onclick="PF(dlgSair).hide();"/>
			</p>
			<p class="fl_right">
				<p:commandButton id="sairButton" value="Sair" height="50" width="50" actionListener="#{acessoMB.logout}"/>
			</p>  
		</f:facet>  
    </p:dialog>

	</h:form> 
	
	    <!-- ########################################################################################## -->

	<div class="wrapper row2">
	    <div id="container" class="clear"> 
	    <div id="homepage"> 
	    	<h:form id="form2">
	    	
				<p:panel id="altCardapioG1" header="#{cardapiosAlteracaoMB.nomeTelaCadastro}" style="color:red;font-size:16px;background-color:Gray;"
				rendered="#{cardapiosAlteracaoMB.selectedPanelCadastro}">

					<p:toolbar id="menu">  
				  		 <f:facet name="left">
						     <p:commandButton title="Salvar" icon="ui-iconSave" actionListener="#{cardapiosAlteracaoMB.salvarCardapio}" 
						     disabled="#{cardapiosAlteracaoMB.statusEditar}" style="width:40px;height:40px;" update="@form"/>
								<p:separator />
								
							<p:commandButton  title="Alterar" icon="ui-iconEditar" style="width:40px;height:40px;"
					  		action="#{cardapiosAlteracaoMB.editarCampos}" immediate="true" update="altCardapioG1" disabled="#{cardapiosAlteracaoMB.statusBtnAlterar}"/>
								<p:separator />
							
							<p:commandButton title="Cancelar" type="reset" icon="ui-iconLimpar" ajax="true" update="altCardapioG1"
							disabled="#{cardapiosAlteracaoMB.statusEditar}" style="width:40px;height:40px;"/>
					         <p:separator />
						</f:facet>  
					</p:toolbar>
					<div style="height:0px"></div>
					<p:sticky  target="menu" />
					
					<p:messages id="messages" autoUpdate="true" showDetail="true" closable="true" />
					
  					<p:tabView id="principalTab" effect="fade" effectDuration="normal" style="background-color:#FAFAFA;height:700px">
			   				<p:tab title="Dados Cardápio" titleStyle="background-color:red">  
				  				 <p:panel header="Descrição Prato" id="pnlDescricaoCardapio"  style="margin-bottom:20px">
				  				 	
				  				 	<h:panelGrid id="gridDescPrato" columns="2" border="0" cellpadding="10" styleClass="ui-panelgrid">
				  				 		<h:outputText for="nomeCardapio" value="Nome Prato:"/>
										<p:inputText id="nomeCard" size="55" value="#{cardapiosAlteracaoMB.cardapioVO.nomePrato}" disabled="#{cardapiosAlteracaoMB.statusEditar}"/>
			
			
	   			  				 		<h:outputText for="tipoCardapio" value="Categoria Prato:"/>
				  				 		 <p:selectOneMenu id="tipoPrato" value="#{cardapiosAlteracaoMB.cardapioVO.categoriaPratoID}" style="width:100%"  disabled="#{cardapiosAlteracaoMB.statusEditar}">
							            	<f:selectItem itemLabel="#{cardapiosAlteracaoMB.cardapioVO.objPratoSy.descricao}" itemValue="#{cardapiosAlteracaoMB.cardapioVO.objPratoSy.idPratoSys}" />
							            	<f:selectItems value="#{cardapiosAlteracaoMB.pratoL}" var="prato" itemLabel="#{prato.descricao}" itemValue="#{prato.idPratoSys}" />
							        	</p:selectOneMenu>
	   								</h:panelGrid>
				  				 	
				  				 	<p:layout style="min-width:320px;min-height:240px" styleClass="ui-layout">
									    <p:layoutUnit position="west" resizable="true">
											<p:menu style="height:100px">
											    <p:submenu label="">
											        <p:menuitem value="#{cardapiosAlteracaoMB.nomePratoCouverCardapio}" actionListener="#{cardapiosAlteracaoMB.visibleDescricaoCouvertAlt}" update="pnlDescricaoCardapio" icon="fa-file"/>
											        <p:menuitem value="#{cardapiosAlteracaoMB.nomePratoFrioCardapio}" actionListener="#{cardapiosAlteracaoMB.visibleDescricaoSaladaAlt}" update="pnlDescricaoCardapio" icon="fa-file"/>
											        <p:menuitem value="#{cardapiosAlteracaoMB.nomePratoQuenteCardapio}" actionListener="#{cardapiosAlteracaoMB.visibleDescricaoQuenteAlt}" update="pnlDescricaoCardapio" icon="fa-circle-o-notch" />
											        <p:menuitem value="#{cardapiosAlteracaoMB.nomeAcompanhamentoCardapio}" actionListener="#{cardapiosAlteracaoMB.visibleDescricaoAcompanhamentoAlt}" update="pnlDescricaoCardapio" icon="fa-circle-o-notch"/>
											        <p:menuitem value="#{cardapiosAlteracaoMB.nomeSobremesaCardapio}" actionListener="#{cardapiosAlteracaoMB.visibleDescricaoSobremesaAlt}" update="pnlDescricaoCardapio" icon="fa-circle-o-notch"/>
											    </p:submenu>
											</p:menu>
										</p:layoutUnit>
										 
										<p:layoutUnit id="layoutCardapio" position="center" style="height:33px">

											<h:panelGrid rendered="#{cardapiosAlteracaoMB.statusAltPratoCouvert}" styleClass="ui-panelgrid">
								                 <f:facet name="header">
								                 	:: <h:outputText value="#{cardapiosAlteracaoMB.nomePratoCouverCardapio}"/>
								                 </f:facet>
								                 <h:column>
							 						<br/>
							 						<div align="center">
										                <p:inputTextarea style="height:90px;width:580px;" rows="5" value="#{cardapiosAlteracaoMB.cardapioVO.couvert}"
										                 cols="30" counter="displayCouvert" maxlength="100" counterTemplate="{0} caracteres." autoResize="false" disabled="#{cardapiosAlteracaoMB.statusEditar}"/>
														<br/>
													</div>
													<h:outputText id="displayCouvert" />
	   											</h:column>
											</h:panelGrid>

											<h:panelGrid rendered="#{cardapiosAlteracaoMB.statusAltPratoFrio}" styleClass="ui-panelgrid">
								                 <f:facet name="header">
								                 	:: <h:outputText value="#{cardapiosAlteracaoMB.nomePratoFrioCardapio}"/>
								                 </f:facet>
								                 <h:column>
							 						<br/>
							 						<div align="center">
										                <p:inputTextarea style="height:90px;width:580px;" rows="5" value="#{cardapiosAlteracaoMB.cardapioVO.entradasFrias}"
										                 cols="30" counter="displayFria" maxlength="100" counterTemplate="{0} caracteres." autoResize="false" disabled="#{cardapiosAlteracaoMB.statusEditar}"/>
														<br/>
													</div>
													<h:outputText id="displayFria" />
	   											</h:column>
											</h:panelGrid>

											<h:panelGrid rendered="#{cardapiosAlteracaoMB.statusAltPratoQuente}" styleClass="ui-panelgrid">
								                 <f:facet name="header">
								                 	:: <h:outputText value="#{cardapiosAlteracaoMB.nomePratoQuenteCardapio}"/>
								                 </f:facet>
								                 <h:column>
							 						<br/>
							 						<div align="center">
										                <p:inputTextarea style="height:90px;width:580px;" rows="5" value="#{cardapiosAlteracaoMB.cardapioVO.entradasQuentes}"
										                 cols="30" counter="displayQuente" maxlength="100" counterTemplate="{0} caracteres." autoResize="false" disabled="#{cardapiosAlteracaoMB.statusEditar}"/>
														<br/>
										            </div>
										            <h:outputText id="displayQuente" />
	   											</h:column>
   											</h:panelGrid>
   											
   											<h:panelGrid rendered="#{cardapiosAlteracaoMB.statusAltAcompanhamento}" styleClass="ui-panelgrid">
								                 <f:facet name="header">
								                 	:: <h:outputText value="#{cardapiosAlteracaoMB.nomeAcompanhamentoCardapio}"/>
								                 </f:facet>
								                 <h:column>
							 						<br/>
							 						<div align="center">
										                <p:inputTextarea style="height:90px;width:580px;" rows="5" value="#{cardapiosAlteracaoMB.cardapioVO.acompanhamento}"
										                 cols="30" counter="displayAcompanhamento" maxlength="100" counterTemplate="{0} caracteres." autoResize="false" disabled="#{cardapiosAlteracaoMB.statusEditar}"/>
														<br/>
													</div>
													<h:outputText id="displayAcompanhamento" />
	   											</h:column>
   											</h:panelGrid>
   											
   											<h:panelGrid rendered="#{cardapiosAlteracaoMB.statusAltSobremesa}" styleClass="ui-panelgrid">
								                 <f:facet name="header">
								                 	:: <h:outputText value="#{cardapiosAlteracaoMB.nomeSobremesaCardapio}"/>
								                 </f:facet>
								                 <h:column>
							 						<br/>
							 						<div align="center">
										                <p:inputTextarea style="height:90px;width:580px;" rows="5" value="#{cardapiosAlteracaoMB.cardapioVO.sobremesa}"
										                 cols="30" counter="displaySobremesa" maxlength="100" counterTemplate="{0} caracteres." autoResize="false" disabled="#{cardapiosAlteracaoMB.statusEditar}"/>
														<br/>
													</div>
													<h:outputText id="displaySobremesa" />
	   											</h:column>
   											</h:panelGrid>
   											
									    </p:layoutUnit>
									</p:layout>
							    </p:panel>
							    
							    <p:panel header="Status Cardápio"  style="margin-bottom:20px">
	    							<h:panelGrid id="gridAtivacao" columns="2" columnClasses="gridFindCol1With1-2Col,gridFindCol2With1-2Col">  
										
										<h:outputText for="dtAtivacao" value="#{msgs.DtAtivacao}"/>
										<p:calendar id="dtAtivacao" readonly="true" disabled="true" value="#{cardapiosAlteracaoMB.cardapioVO.dtInicio}" locale="pt_BR" pattern="dd/MM/yyyy" />
										
										<h:outputText for="dtTermino" value="#{msgs.DtExpira}"/>
										<p:calendar id="dtTermino" readonly="true" disabled="true" value="#{cardapiosAlteracaoMB.cardapioVO.dtTermino}" locale="pt_BR" pattern="dd/MM/yyyy" />

										<h:outputText  value="#{msgs.statusCons}"/>
										<h:outputText style="font-weight:bold;color: green; width: 100px" size="20" value="#{cardapiosAlteracaoMB.cardapioVO.status}" rendered="#{cardapiosAlteracaoMB.cardapioVO.status == 'ATIVO'}"/>
										<h:outputText style="font-weight:bold;color: blue" size="20"  value="#{cardapiosAlteracaoMB.cardapioVO.status}" rendered="#{cardapiosAlteracaoMB.cardapioVO.status == 'AGENDADO ATIVAÇÃO'}"/>
										<h:outputText style="font-weight:bold;color: red" size="20" value="#{cardapiosAlteracaoMB.cardapioVO.status}" rendered="#{cardapiosAlteracaoMB.cardapioVO.status == 'INATIVO'}"/>
    			   					</h:panelGrid>  
									
									<p:commandButton value="Inativar Cardápio"  id="btnInativarCardapio"
									icon="ui-iconDesativa" onclick="PF('dlgMsgInativacao').show();"  style="background-color: #CD5C5C" 
									rendered="#{cardapiosAlteracaoMB.cardapioVO.status.equals('ATIVO')}"/>
										  		
									<p:commandButton value="Ativar Cardápio" id="btnAtivaCardapio"
									icon="ui-iconAtiva" onclick="PF('dlgMsgAtivacao').show();"  style="background-color: #228B22" 
									rendered="#{cardapiosAlteracaoMB.cardapioVO.status.equals('INATIVO')}" />
									
									<p:commandButton value="Ativar/Inativar Cardápio" id="btnAtivaInativarCardapio"
									icon="ui-iconAtiva" onclick="PF('dlgMsgAtivacaoInativacao').show();"  style="background-color: #228B22" 
									rendered="#{cardapiosAlteracaoMB.cardapioVO.status.equals('AGENDADO ATIVAÇÃO')}" />
						    	</p:panel>
			  			</p:tab>
  						
						<p:tab id="tabComposicaoAl" title="Dados Composição Alimentar">  
									<p:panelGrid columns="2">
										<f:facet name="header">Composição Atual do Cardápio</f:facet>
   										<p:column>
								           
								           <p:dataTable  style="height:50%" id="dtListAlimentos" var="alimentoAlt" value="#{cardapiosAlteracaoMB.alimentoEntityAltL}" 
								           itemLabel="#{alimentoAlt.descricao}" selection="#{cardapiosAlteracaoMB.alimentoSelAlt}"  
								           rowKey="#{alimentoAlt}" selectionMode="single">  
  
										        <p:column headerText="Alimento do Cardápio" style="font-size:12px;width:100%">  
										            <h:outputText value="#{alimentoAlt.descricao}" />  
										        </p:column>  
										  
										        <f:facet name="footer">  
										        	<p class="fl_left">
											            <p:commandButton value="Excluir" image="ui-icon ui-iconAdiciona" update="dtListAlimentos" 
											            action="#{cardapiosAlteracaoMB.excluirAlimento()}" disabled="#{cardapiosAlteracaoMB.statusEditar}" />
											        </p>
											        <p class="fl_right">
											        	<p:commandButton value="Adicionar"   image="ui-icon ui-icon-search" 
											        	onclick="PF('dlgComposicaoAlimentar').show();" disabled="#{cardapiosAlteracaoMB.statusEditar}"/>
											        </p>  
										        </f:facet>  
										    </p:dataTable>  
   										</p:column>											
							        </p:panelGrid>
					     </p:tab>   
           		
						<p:tab id="agendamentoTab" title="Dados Agendamento">
							<p:panelGrid style="margin-top:5x">
							    <f:facet name="header">
							        <p:row>
							            <p:column colspan="2">
						    				<h:outputText value="#{msgs.disponibilidadeSemana}" style="font-weight:bold;color:black"/>
										</p:column>
							        </p:row>
							  	</f:facet>
								<p:row>
							        <p:column>
							           <p:dataTable id="dtDiasSemana" var="dias" value="#{cardapiosAlteracaoMB.diasSemana}" rows="7" 
							           selection="#{cardapiosAlteracaoMB.diaSelecionado}" rowKey="#{dias}" selectionMode="single"  >  
 
									        <p:column headerText="Agendamento Diário" style="font-size:14px;width:100%">  
									            <h:outputText value="#{dias}" />  
									        </p:column>  
									  
									        <f:facet name="footer">  
									        	<p class="fl_left">
										            <p:commandButton value="Exclui Dias" update="dtDiasSemana" 
										            action="#{cardapiosAlteracaoMB.excluirDias()}" disabled="#{cardapiosAlteracaoMB.statusEditar}"
										            styleClass="ui-confirmdialog-no" icon="ui-icon-minusthick" />
										            
										        </p>
										        <p class="fl_right">
										            <p:commandButton value="Adiciona Dias" onclick="PF('dlgDiasSemana').show();"
										            disabled="#{cardapiosAlteracaoMB.statusEditar}" styleClass="ui-confirmdialog-no" icon="ui-icon-plus"/>
										        </p>  
									        </f:facet>  
									    </p:dataTable>  
							        </p:column>
							    </p:row>
							</p:panelGrid>
							
							<p:panelGrid style="margin-top:5x;font-size::12px">
							    <p:row>
       								<p:column colspan="2" styleClass="ui-widget-header">
										<h:outputText value="#{msgs.periodoDisponibilidade}" />
       								</p:column>
   								</p:row>
      								
   								<p:row rendered="#{cardapiosAlteracaoMB.cardapioVO.status == 'AGENDADO ATIVAÇÃO'}">
									<p:column>
									    <h:outputText value="#{msgs.periodoInicio}"/>
									</p:column>
									<p:column>
							 		 	<p:calendar id="dtInicioAtivacao" value="#{cardapiosAlteracaoMB.dtAtivacao}" mindate="#{cardapiosAlteracaoMB.dtAtual}"
							     	 	maxdate="#{cardapiosAlteracaoMB.dtExpContrato}" locale="pt_BR" pattern="dd/MM/yyyy" disabled="#{cardapiosAlteracaoMB.statusEditar}"/>
									</p:column>
								</p:row>
    								<p:row>
									<p:column style="font-size:16px;width:30%">
									    <h:outputText value="#{msgs.periodoFim}"/>
									</p:column>
							 		<p:column>
	   									<p:calendar id="dtExpira" value="#{cardapiosAlteracaoMB.cardapioVO.dtTermino}" showOn="button" mindate="#{cardapiosAlteracaoMB.dtAtual}" 
	   									maxdate="#{cardapiosAlteracaoMB.dtExpContrato}" disabled="#{cardapiosAlteracaoMB.statusEditar}"/>
									</p:column>
								</p:row>
   										  	
							</p:panelGrid>
		     			</p:tab>
  				</p:tabView>
  			</p:panel>
 		<!--	</h:form>
 			
 		  	<h:form id="form3"> 
 			-->
 			
    		<!-- ############################ DIALOG ::  MENSAGEM  ATIVAÇÃO/DESATIVACAO/ALTERAR ########################### -->
    		
    		<p:dialog id="dialogMsgAtivacao" header="Ativar Cardápio" modal="true" height="100"
    		 width="390" widgetVar="dlgMsgAtivacao" resizable="false" showEffect="fade" hideEffect="fade">  
				<h:outputLabel value="#{msgs.msgAtivacaoCardapio}" style="font-size:15px"/>
				<f:facet name="footer">  
					<p class="fl_left">
					    <p:commandButton value="Cancela Ativação" image="ui-confirmdialog-no" icon="ui-icon-close"  onclick="PF('dlgMsgAtivacao').hide();"/>
					</p>
					<p class="fl_right">
						<p:commandButton value="Confirma Ativação" image="ui-confirmdialog-no" onclick="PF('dlgAtivarCardapio').show();"
						action="#{cardapiosAlteracaoMB.setValoresAtivaCardapio}">
						</p:commandButton>
					</p>  
				</f:facet>  
			</p:dialog>
			
			<p:dialog id="dialogMsgInativacao" header="Inativar Cardápio" modal="true" height="100"
    		 width="390" widgetVar="dlgMsgInativacao" resizable="false" showEffect="fade" hideEffect="fade">  
				<h:outputLabel value="#{msgs.msgInativacaoCardapio}" style="font-size:15px"/>
				<f:facet name="footer">  
					<p class="fl_left">
					    <p:commandButton value="Cancela  Inativação" image="ui-confirmdialog-no" icon="ui-icon-close"  onclick="PF('dlgMsgInativacao').hide();"/>
					</p>
					<p class="fl_right">
						<p:commandButton value="Confirma Inativação" image="ui-icon ui-icon-search" update=":form2:altCardapioG1" 
						action="#{cardapiosAlteracaoMB.statusCardapioAtivaInativa()}" onclick="PF('dlgMsgInativacao').hide();">
 			                	<f:setPropertyActionListener target="#{cardapiosAlteracaoMB.statusAtivaInativaCardapio}" value="0" /> 
						</p:commandButton>
					</p>  
				</f:facet>
			</p:dialog>
			
			<p:dialog id="dialogMsgAtivacaoInativacao" header="Ativar / Inativar Cardápio" modal="true" height="100"
    		 width="390" widgetVar="dlgMsgAtivacaoInativacao" resizable="false" showEffect="fade" hideEffect="fade">  
				<h:outputLabel value="#{msgs.msgAtivacaoInativacaoCardapio}" style="font-size:15px"/>
				<f:facet name="footer">  
					<p class="fl_left">
					    <p:commandButton value="Ativar Cardápio"  image="ui-confirmdialog-no" action="#{cardapiosAlteracaoMB.setValoresAtivaCardapio}"
					     onclick="PF('dlgAtivarCardapio').show();"/>
					</p>
					<p class="fl_right">
						<p:commandButton value="Inativar Cardápio" image="ui-icon ui-icon-search" update=":form2:altCardapioG1" 
						action="#{cardapiosAlteracaoMB.statusCardapioAtivaInativa()}" onclick="PF('dlgMsgAtivacaoInativacao').hide();">
 			                	<f:setPropertyActionListener target="#{cardapiosAlteracaoMB.statusAtivaInativaCardapio}" value="0" /> 
						</p:commandButton>
					</p>  
				</f:facet>
			</p:dialog>
			
			
			<!-- ############################ DIALOG :: ALTERAÇÃO CARDAPIO   ########################### -->
			 
			
			<p:dialog id="dialogMsgAlteracao" header="Alteração Cardápio" modal="true" height="100"
    		 width="390" widgetVar="dlgMsgAlteracao" resizable="false" showEffect="fade" hideEffect="fade">  
				<h:outputLabel value="#{msgs.msgAlteracaoCardapio}" style="font-size:15px"/>
				<f:facet name="footer">  
					<div align="center">
		       			<p:commandButton value="OK" styleClass="ui-confirmdialog-no" icon="ui-icon-close"  update=":form2:altCardapioG1"/>
				    </div>
				</f:facet>   
			</p:dialog>
			
 	 		<!-- ############################ DIALOG ::  ATIVAR CARDÁPIO ############################ -->
	  				<p:dialog id="dialogAtiva" header="Ativação Cardápio"  modal="true" resizable="false"
 					height="400" width="800" widgetVar="dlgAtivarCardapio" showEffect="fade" hideEffect="fade" styleClass="disable-scroll"
 					style="background-color:#F5F5F5">  
							<p:messages id="msgAtivaCardapio"  autoUpdate="true" for="agendamentoDias" showDetail="true" closable="true" />
				  	
				  		<br/>
						<h:panelGrid  columns="1" style="margin-bottom:10px" cellpadding="5">
						    <h:outputText value="#{msgs.diasSemanaDescricao}" style="font-weight:bold;color:black"/>
						    <h:column>
					        	<p:selectManyButton id="diasSemana" value="#{cardapiosAlteracaoMB.selectDiasSemana}" 
					        	style="font-size:13px;font-weight:bold;color:#000080">
						            <f:selectItem itemLabel="#{msgs.diasSemanaSeg}" itemValue="#{msgs.diasSemanaSeg}" />
						            <f:selectItem itemLabel="#{msgs.diasSemanaTer}" itemValue="#{msgs.diasSemanaTer}" />
						            <f:selectItem itemLabel="#{msgs.diasSemanaQua}" itemValue="#{msgs.diasSemanaQua}" />
						            <f:selectItem itemLabel="#{msgs.diasSemanaQui}" itemValue="#{msgs.diasSemanaQui}" />
						            <f:selectItem itemLabel="#{msgs.diasSemanaSex}" itemValue="#{msgs.diasSemanaSex}" />
						            <f:selectItem itemLabel="#{msgs.diasSemanaSab}" itemValue="#{msgs.diasSemanaSab}" />
						            <f:selectItem itemLabel="#{msgs.diasSemanaDom}" itemValue="#{msgs.diasSemanaDom}" />
						        </p:selectManyButton>
						    </h:column>
						 </h:panelGrid>
						
						<h:panelGrid id="gridDtInicio" columns="1" style="margin-bottom:10px" cellpadding="5">
								<h:column>
								    <h:outputText value="#{msgs.dtInicioAgendamento}" style="font-weight:bold;color:black"/>
							    </h:column>
							    <h:column>
							     	<p:calendar id="dtInicio" value="#{cardapiosAlteracaoMB.cardapioVO.dtInicio}" mindate="#{cardapiosAlteracaoMB.dtAtual}"
							     	 maxdate="#{cardapiosAlteracaoMB.dtExpContrato}" locale="pt_BR" pattern="dd/MM/yyyy" />
							    </h:column>
									<p:outputLabel value="#{msgs.dtInicioRegraAtiva}" style="font-size:12px;color:#2F4F4F"/>
					  	</h:panelGrid>
					  	
	
						<p:outputPanel id="panelAgendamentoDtFim">  
								<h:panelGrid id="gridAgendamentoDtFim" columns="1" border="0" cellpadding="10" 
								rendered="#{cardapiosAlteracaoMB.opcDataTermino}">
								    <h:column>
										<p:outputLabel for="dtExpira" value="#{msgs.dtFimAgendamento}" style="font-weight:bold;color:black"/>
								    </h:column>
								    <h:column>
			   							<p:calendar id="dtExpira" value="#{cardapiosAlteracaoMB.cardapioVO.dtTermino}" mindate="#{cardapiosAlteracaoMB.dtAtual}"
								     	 maxdate="#{cardapiosAlteracaoMB.dtExpContrato}" locale="pt_BR" pattern="dd/MM/yyyy" />
								    </h:column>
										<p:outputLabel value="#{msgs.dtFimDescricao}" style="font-size:12px;color:#2F4F4F"/>
								</h:panelGrid>
						</p:outputPanel> 
					          
					    <f:facet name="footer">  
				           	<p class="fl_left">
						              <p:commandButton id="butnCancelAtivacao" value="Cancelar" height="50" width="50" onclick="dlgAtivarCardapio.hide();"/>
						        </p>
								<p class="fl_right">
						              <p:commandButton id="btnConfirmaAtivacao" value="Ativar" height="50" width="50" 
						               action="#{cardapiosAlteracaoMB.alterarStatusCardapioAtivar()}" update=":form2:altCardapioG1">
							               <f:setPropertyActionListener target="#{cardapiosAlteracaoMB.statusAtivaInativaCardapio}" value="1" /> 	 
						             </p:commandButton>
								</p>  
				        </f:facet>  
    				</p:dialog>
	 	
 	
 			<!-- ############################ DIALOG ::  COMPOSIÇÃO DE ALIMENTOS ############################ -->
    	    <p:dialog id="dialogComposicao" header="#{cardapiosAlteracaoMB.nomeTelaComposicao}" modal="true" style="background-color:#F5F5F5" 
		 		height="380" width="800" widgetVar="dlgComposicaoAlimentar" resizable="false" showEffect="fade" hideEffect="fade">  
			
			    <h:outputLabel value="Para tornar o cardápio fácil de ser encontrado pelos usuários mobile, informe abaixo a sua composição alimentar" 
						            style="font-size:15px"/>
				<br/>
				<br/>
					<div align="center">
				  
  					<p:carousel id="crlAlimentoComposicao" style="width:100px;height:315px" value="#{cardapiosAlteracaoMB.alimentoTipoL}" headerText="Basic" 
					var="alimentoTipo" itemStyleClass="alimentoItem"> 
				        <h:panelGrid columns="2" style="width:100%;height:220px" cellpadding="5" columnClasses="label,value">
				            <f:facet name="header">
								<h:outputText value="#{alimentoTipo.nomeTipo}" />
				            </f:facet>
				            
				           <p:selectManyMenu id="selectAlimentos" value="#{cardapiosAlteracaoMB.selectedAlimentoL}" converter="alimentosConverter"
				        		filterMatchMode="contains" showCheckbox="true" var="a" style="width:200px;height:210px">
								<f:selectItems value="#{cardapiosAlteracaoMB.alimentoL}" var="alimentoComposicao" itemLabel="#{alimentoComposicao.descricao}"
								itemValue="#{alimentoComposicao}" />
								<p:column>
									<h:outputText value="#{a.descricao}"/>
								</p:column>
								
				        	</p:selectManyMenu>

				        </h:panelGrid>
  				    </p:carousel>
  				 </div>
  				<f:facet name="footer">	  
		        	<p class="fl_left">
						<p:commandButton  value="#{msgs.CancelarCardapio}" icon="ui-icon-ui-icon-closethick" onclick="PF(dlgComposicaoAlimentar).hide();"/>
		        	</p>  
					<p class="fl_right">
 						   <p:commandButton value="#{msgs.AdicionarAlimentoCardapio}" icon="ui-icon-ui-icon-plusthick" 
 						   action="#{cardapiosAlteracaoMB.adicionaAlimentos()}" onclick="PF(dlgComposicaoAlimentar).hide();" update=":form2:altCardapioG1">
 						   </p:commandButton>
					</p>
	    		</f:facet>
			</p:dialog>
	
  			<!-- ############################ DIALOG :: DIAS SEMANA ########################### -->
			
    		<p:dialog id="dialogSemana" header="Agendamento semanal" modal="true" style="background-color:#F5F5F5"
		 		height="280" width="420" widgetVar="dlgDiasSemana" resizable="false" showEffect="fade" hideEffect="fade">  
				
				<p:messages id="msgDias" for="addSemana" showDetail="true" closable="true" />
   
				<h:outputLabel value="#{msgs.tituloDiasSemanaCardapio}" style="font-size:15px"/>
				<br/>
				<br/>
		 		<p:selectOneMenu id="somDiasSemana" value="#{cardapiosAlteracaoMB.diaSelecionado}" style="width:300px">
			            <f:selectItem itemLabel="Select One" itemValue="" />
			            <f:selectItem itemLabel="Segunda-Feira" itemValue="Segunda-Feira" />
			            <f:selectItem itemLabel="Terça-Feira" itemValue="Terça-Feira" />
			            <f:selectItem itemLabel="Quarta-Feira" itemValue="Quarta-Feira" />
			            <f:selectItem itemLabel="Quinta-Feira" itemValue="Quinta-Feira" />
			            <f:selectItem itemLabel="Sexta-Feira" itemValue="Sexta-Feira" />
			            <f:selectItem itemLabel="Sabado" itemValue="Sabado" />
			            <f:selectItem itemLabel="Domingo" itemValue="Domingo" />
		        </p:selectOneMenu>
		        
				<f:facet name="footer">  
					<p class="fl_left">
		       			<p:commandButton value="Cancelar" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" 
		       			onclick="PF('dlgDiasSemana').hide();"/>
				    </p>
					<p class="fl_right">
				        <p:commandButton value="Adicionar" action="#{cardapiosAlteracaoMB.adicionaDias()}" styleClass="ui-confirmdialog-yes" 
				        icon="ui-icon-plus" update=":form2:altCardapioG1" onclick="PF('dlgDiasSemana').hide();"/>
					</p>  
				</f:facet> 
			</p:dialog>
		</h:form>
	</div>
 	</div>
	</div>

	<!-- Copyright -->
	<div class="wrapper row4">
	  <footer id="copyright" class="clear">
	    <p class="fl_left">Copyright 2014 - All Rights Reserved - <a href="#">W7VM</a></p>
	    <p class="fl_right">W7VM <a href="http://www.w7vm.com/" title="Developer Application Mobile">Developer Application Mobile</a></p>
	  </footer>
	</div>
</h:body>
</html>